﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WCS.Infrastructure.Dto.Request.Lottery
{

    /// <summary>
    /// 抽奖奖品创建请求DTO
    /// </summary>
    public class LotteryPrizeCreateRequestDto
    {

        /// <summary>
        /// 所属活动ID
        /// </summary>
        [StringLength(32)]
        public string? ActivityId { get; set; }

        /// <summary>
        /// 奖品列表
        /// </summary>
        public List<LotteryPrizeCreateDto> LotteryPrizes { get; set; } = new List<LotteryPrizeCreateDto>();

    }

    /// <summary>
    /// 奖品创建DTO
    /// </summary>
    public class LotteryPrizeCreateDto
    {
        /// <summary>
        /// 奖品自身抽中概率（比例值），有效奖品概率和≤1，其余视为“谢谢参与”
        /// </summary>
        [Precision(9, 6)]
        public decimal Ratio { get; set; }

        /// <summary>
        /// 关联优惠券模板ID
        /// </summary>
        [StringLength(32)]
        public string TemplateId { get; set; }

        /// <summary>
        /// 扩展属性（JSON文本）
        /// </summary>
        public string? ExtraProperties { get; set; }
    }
}
